const http = require('http');
const server = http.createServer();
server.on('request', (req, res) => {
    res.writeHead(200, { 'Content-Type': 'text/html;charset=UTF-8' });
    // 返回响应
    res.end('首页12');
})
// 指定端口启动
server.listen(80, () => {
    console.log('服务器开启: http://127.0.0.1');
})